﻿var clients = [];
$(function () {
    clients = $.clientsInit();
})
$.clientsInit = function () {
    var dataJson = {
        dataItems: [],
        organize: [],
        role: [],
        duty: [],
        user: [],
        authorizeMenu: [

        ],
        authorizeButton: []
    };
    var init = function () {
        $.ajax({
            url: "/home/GetClientsDataJson?"+(new Date()).valueOf(),
            type: "get",
            dataType: "json",
            async: false,
            success: function (data) {
                //dataJson.dataItems = data.dataItems;
                //dataJson.organize = data.organize;
                //dataJson.role = data.role;
                //dataJson.duty = data.duty;
                //alert(data.authorizeMenu);
                //;
                dataJson.authorizeMenu = data.authorizeMenu;
                //dataJson.authorizeButton = data.authorizeButton;
            }
        });
    }
    init();
    return dataJson;
}